(1) Field of the Invention
The present invention relates to a picture coding apparatus that codes picture information of moving pictures and in particular, to a picture coding apparatus that performs variable-length coding on information such as a quantized DCT coefficient and outputs the coded information.
(2) Description of the Related Art
In the moving picture coding technology, the efficiency of coding has been improved. It is becoming possible to implement a television-phone system that provides smooth moving pictures on cellular phones and to take moving pictures with high resolution using cellular phones. With the progresses in the coding technology, H.264/MPEG-4 AVC, which is the latest international standard for the moving picture compression coding technology, provides highly efficient entropy coding methods using syntax elements, such as DCT coefficients and motion vectors, which are specified to be transmitted using a syntax. Instead of simple, table-based conversion, the coding methods having high coding efficiency are used in this standard: a variable length coding referred to as Context-Adaptive Variable length Coding (CAVLC) and an arithmetic coding referred to as Context-Adaptive Binary Arithmetic Coding (CABAC). The arithmetic coding such as CABAC is said to be, in theory, capable of compressing a steady signal up to the limit. CABAC has an advantage that it is highly efficient in coding as stated above. However, it suffers from a disadvantage that the code amount cannot be known before the completion of coding. Therefore, as to data rate control, it is difficult to control coding on the basis of the code amount.
In a conventional technique, on the other hand, the code amount is estimated on the basis of a predictive residual, which is a difference signal between an original picture and a predicted picture which is calculated when picture information of moving pictures is coded.
This is described in Japanese Unexamined Patent Application Publication No. 2005-203905.
However, there is a problem that the accuracy of estimation decreases when the code amount is estimated only on the basis of predictive residuals. In other words, a coefficient component of coded information can be obtained by DCT-transformation, quantization, and coding of a predictive residual. Accordingly, in the case of coding at high data rates, coefficient components representing predictive residuals are dominant in the coded signal and there is a strong correlation between the predictive residuals and the coefficient components of coded information. Therefore, the code amount can be estimated with high accuracy, using the predictive residuals. For coding at low data rates, however, a large value as a quantization step in quantization is often selected and a skip or direct mode is often selected. When a large value as a quantization step is selected, the value of a predictive residual after quantization is small and the data amount of the predictive residual is accordingly small. In a skip mode, predictive residuals are not coded, and thus, the data amount of the predictive residuals is zero. Consequently, the ratio of coefficient components of predictive residuals to the coded information becomes low, whereas the ratio of information representing motion vectors and header information indicating coding conditions becomes high. Therefore, the accuracy of estimation of the code amount by a method using predictive residuals alone as in the conventional technique becomes low.